<!-- <template>
  <div id="centerRight2">
    <div class="bg-color-black">
      <div class="d-flex pt-2 pl-2">
        <span>
          <icon name="align-left" class="text-icon"></icon>
        </span>
        <span class="fs-xl text mx-2">厂区碳排放分析</span>
      </div>
      <div class="d-flex ai-center flex-column body-box">
        <dv-capsule-chart class="dv-cap-chart" :config="config" />
        <centerRight2Chart1 />
      </div>
    </div>
  </div>
</template>

<script>
import centerRight2Chart1 from '@/components/echart/centerRight/centerRightChart'

export default {
  data() {
    return {
      config: {
        data: [
          {
            name: '厂区0001',
            value: 985
          },
          {
            name: '厂区0002',
            value: 653
          },
          {
            name: '厂区0003',
            value: 345
          },
          {
            name: '厂区0004',
            value: 654
          },
          {
            name: '厂区0005',
            value: 465
          },
          {
            name: '厂区0006',
            value: 324
          },
          {
            name: '厂区0007',
            value: 323
          },
          {
            name: '厂区0008',
            value: 423
          },
          {
            name: '厂区0009',
            value: 238
          },

        ]
      }
    }
  },
  components: { centerRight2Chart1 }
}
</script>

<style lang="scss" scoped>
#centerRight2 {
  $box-height: 410px;
  $box-width: 340px;
  padding: 5px;
  height: $box-height;
  width: $box-width;
  border-radius: 5px;
  .bg-color-black {
    padding: 5px;
    height: $box-height;
    width: $box-width;
    border-radius: 10px;
  }
  .text {
    color: #c3cbde;
  }
  .body-box {
    border-radius: 10px;
    overflow: hidden;
    .dv-cap-chart {
      width: 100%;
      height: 160px;
    }
  }
}
</style> -->
<template>
  <div id="center">
    <!-- <div class="up">
      <div
        class="bg-color-black item"
        v-for="item in titleItem"
        :key="item.title"
      >
        <p class="ml-3 colorBlue fw-b fs-xl">{{ item.title }}</p>
        <div>
          <dv-digital-flop
            class="dv-dig-flop ml-1 mt-2 pl-3"
            :config="item.number"
          />
        </div>
      </div>
    </div> -->
    <div class="down">
      <div class="ranking bg-color-black">
        <span>
          <icon name="chart-pie" class="text-icon"></icon>
        </span>
        <!-- <span class="fs-xl text mx-2 mb-1 pl-3">年度负责人组件达标榜</span> -->
        <div>部门排名</div>
        <dv-scroll-ranking-board class="dv-scr-rank-board mt-1" :config="ranking" />
      </div>
      <!-- <div class="percent">
        <div class="item bg-color-black">
          <span>今日任务通过率</span>
          <CenterChart
            :id="rate[0].id"
            :tips="rate[0].tips"
            :colorObj="rate[0].colorData"
          />
        </div>
        <div class="item bg-color-black">
          <span>今日任务达标率</span>
          <CenterChart
            :id="rate[1].id"
            :tips="rate[1].tips"
            :colorObj="rate[1].colorData"
          />
        </div>
        <div class="water">
          <dv-water-level-pond class="dv-wa-le-po" :config="water" />
        </div>
      </div> -->
    </div>
  </div>
</template>

<script>
import CenterChart from '@/components/echart/center/centerChartRate'

export default {
  data() {
    return {
      // titleItem: [
      //   {
      //     title: '今年累计任务建次数',
      //     number: {
      //       number: [120],
      //       toFixed: 1,
      //       textAlign: 'left',
      //       content: '{nt}',
      //       style: {
      //         fontSize: 26
      //       }
      //     }
      //   },
      //   {
      //     title: '本月累计任务次数',
      //     number: {
      //       number: [18],
      //       toFixed: 1,
      //       textAlign: 'left',
      //       content: '{nt}',
      //       style: {
      //         fontSize: 26
      //       }
      //     }
      //   },
      //   {
      //     title: '今日累计任务次数',
      //     number: {
      //       number: [2],
      //       toFixed: 1,
      //       textAlign: 'left',
      //       content: '{nt}',
      //       style: {
      //         fontSize: 26
      //       }
      //     }
      //   },
      //   {
      //     title: '今年失败任务次数',
      //     number: {
      //       number: [14],
      //       toFixed: 1,
      //       textAlign: 'left',
      //       content: '{nt}',
      //       style: {
      //         fontSize: 26
      //       }
      //     }
      //   },
      //   {
      //     title: '今年成功任务次数',
      //     number: {
      //       number: [106],
      //       toFixed: 1,
      //       textAlign: 'left',
      //       content: '{nt}',
      //       style: {
      //         fontSize: 26
      //       }
      //     }
      //   },
      //   {
      //     title: '今年达标任务个数',
      //     number: {
      //       number: [100],
      //       toFixed: 1,
      //       textAlign: 'left',
      //       content: '{nt}',
      //       style: {
      //         fontSize: 26
      //       }
      //     }
      //   }
      // ],
      ranking: {
        data: [
          {
            name: '生产部',
            value: 55
          },
          {
            name: '环境部',
            value: 120
          },
          {
            name: '能源运输部',
            value: 78
          },
          {
            name: '废弃物处理部',
            value: 66
          },
          {
            name: '财务部',
            value: 80
          },
        ],
      },
      water: {
        data: [24, 45],
        shape: 'roundRect',
        formatter: '{value}%',
        waveNum: 3
      },
      // 通过率和达标率的组件复用数据
      rate: [
        {
          id: 'centerRate1',
          tips: 60,
          colorData: {
            textStyle: '#3fc0fb',
            series: {
              color: ['#00bcd44a', 'transparent'],
              dataColor: {
                normal: '#03a9f4',
                shadowColor: '#97e2f5'
              }
            }
          }
        },
        {
          id: 'centerRate2',
          tips: 40,
          colorData: {
            textStyle: '#67e0e3',
            series: {
              color: ['#faf3a378', 'transparent'],
              dataColor: {
                normal: '#ff9800',
                shadowColor: '#fcebad'
              }
            }
          }
        }
      ]
    }
  },
  components: {
    CenterChart
  }
}
</script>

<style lang="scss" scoped>
#center {

  .down {
    padding: 6px 4px;
    padding-bottom: 0;
    width: 100%;
    display: flex;
    height: 100%;
    justify-content: space-between;
    .bg-color-black {
      border-radius: 5px;
    }
    .ranking {
      padding: 10px;
      width: 100%;
      .dv-scr-rank-board {
        height: 356px;
      }
    }
  }
}
</style>

